package com.Arr;

/*
要写注释哦!!!
*/
public class Demo06 {
    public static void main(String[] args) {
        int[] arr = {123, 2, 13423, 4, 7, 1223, 4, 8, 9};
        int max = arr[0];
        int index = 0;
        for (int i = 0; i < arr.length; i++) {
            if (max < arr[i]) {
                max = arr[i];
                index=i;
            }
        }
        System.out.println("最大值为：" + max + "的索引位置为：" + index);
    }
}
